home *** CD-ROM | disk | FTP | other *** search
- diff -c -r orig-gnuplot/command.c gnuplot/command.c
- *** orig-gnuplot/command.c Tue Sep 18 05:56:42 1990
- --- gnuplot/command.c Sun Jun 2 06:20:24 1991
- ***************
- *** 51,56 ****
- --- 51,59 ----
-
- #endif /* MSDOS */
-
- + #ifdef GNU_READLINE
- + #include <readline/readline.h>
- + #endif
-
- #include "plot.h"
- #include "setshow.h"
- ***************
- *** 108,113 ****
- --- 111,120 ----
- char replot_line[MAX_LINE_LEN+1] = "";
- static int plot_token; /* start of 'plot' command */
-
- + #ifdef GNU_READLINE
- + static char *input_line_ptr = (char *)NULL;
- + #endif
- +
- com_line()
- {
- read_line(PROMPT);
- ***************
- *** 1130,1150 ****
- }
-
- #else /* MSDOS */
- ! /* plain old Unix */
-
- read_line(prompt)
- char *prompt;
- {
- int start = 0;
- BOOLEAN more;
- int last = 0;
-
- if (interactive)
- fputs(prompt,stderr);
- do {
- /* grab some input */
- if ( fgets(&(input_line[start]), MAX_LINE_LEN - start, stdin)
- == (char *)NULL ) {
- /* end-of-file */
- if (interactive)
- (void) putc('\n',stderr);
- --- 1137,1187 ----
- }
-
- #else /* MSDOS */
- ! /* plain old Unix + Atari ST */
-
- read_line(prompt)
- char *prompt;
- {
- +
- + #ifdef GNU_READLINE
- + char *input_line_ptr = (char*)NULL;
- + char *curr_prompt = prompt;
- + char *more_prompt = "> ";
- + #endif
- +
- int start = 0;
- BOOLEAN more;
- int last = 0;
-
- + #ifndef GNU_READLINE /* One prompt is enough. */
- if (interactive)
- fputs(prompt,stderr);
- + #endif
- + #ifdef GNU_READLINE
- do {
- +
- + /* If the buffer has already been allocated, free it */
- + if (input_line_ptr != (char *)NULL)
- + free (input_line_ptr);
- +
- + /* grab some input and put non-blank lines in the history list */
- + input_line_ptr = readline (curr_prompt);
- + if (input_line_ptr == (char *)EOF)
- + input_line_ptr = (char *)NULL;
- + if (input_line_ptr && *input_line_ptr)
- + add_history (input_line_ptr);
- +
- + /* copy readline's input buffer to gnuplot's */
- + if (input_line_ptr)
- + strcpy (&(input_line[start]), input_line_ptr);
- +
- + if (input_line_ptr == (char *)NULL) {
- + #else /* GNU_READLINE */
- + do {
- /* grab some input */
- if ( fgets(&(input_line[start]), MAX_LINE_LEN - start, stdin)
- == (char *)NULL ) {
- + #endif /* GNU_READLINE */
- /* end-of-file */
- if (interactive)
- (void) putc('\n',stderr);
- ***************
- *** 1172,1178 ****
- --- 1209,1219 ----
- more = FALSE;
- }
- if (more && interactive)
- + #ifdef GNU_READLINE
- + curr_prompt = more_prompt;
- + #else
- fputs("> ", stderr);
- + #endif /* GNU_READLINE */
- } while(more);
- }
-
- diff -c -r orig-gnuplot/internal.c gnuplot/internal.c
- *** orig-gnuplot/internal.c Tue Mar 27 00:01:26 1990
- --- gnuplot/internal.c Sun Jun 2 04:41:32 1991
- ***************
- *** 47,52 ****
- --- 47,53 ----
- * System V and MSC 4.0 call this when they wants to print an error message.
- * Don't!
- */
- + #ifndef atarist
- #ifdef MSDOS
- #ifdef __TURBOC__
- int matherr() /* Turbo C */
- ***************
- *** 57,62 ****
- --- 58,66 ----
- #else /* MSDOS */
- int matherr()
- #endif /* MSDOS */
- + #else /* atarist */
- + int matherr(struct exception *x)
- + #endif /* atarist */
- {
- return (undefined = TRUE); /* don't print error message */
- }
- Only in gnuplot: makefile.st
- diff -c -r orig-gnuplot/plot.h gnuplot/plot.h
- *** orig-gnuplot/plot.h Mon Mar 26 23:59:10 1990
- --- gnuplot/plot.h Sun Jun 2 04:21:08 1991
- ***************
- *** 44,49 ****
- --- 44,54 ----
- #define FALSE 0
-
-
- + #ifdef atarist /* Grab the definition of cmplx in */
- + /* pmluser.h (aka. math.h) */
- + #include <math.h>
- + #endif /* atarist */
- +
- #define Pi 3.141592653589793
-
-
- ***************
- *** 191,200 ****
- LEFT, CENTRE, RIGHT
- };
-
- struct cmplx {
- double real, imag;
- };
- !
-
- struct value {
- enum DATA_TYPES type;
- --- 196,206 ----
- LEFT, CENTRE, RIGHT
- };
-
- + #ifndef atarist /* Def'ed in math.h. */
- struct cmplx {
- double real, imag;
- };
- ! #endif /* atarist */
-
- struct value {
- enum DATA_TYPES type;
- Only in gnuplot: readme.st
- diff -c -r orig-gnuplot/term.c gnuplot/term.c
- *** orig-gnuplot/term.c Tue Sep 18 05:59:25 1990
- --- gnuplot/term.c Sun Jun 2 04:10:10 1991
- ***************
- *** 412,417 ****
- --- 412,421 ----
- #include "term/x11.trm"
- #endif /* X11 */
-
- + #ifdef ATARIST /* Atari ST screen. */
- + #include "term/atari.trm"
- + #endif
- +
- /* Dummy functions for unavailable features */
-
- /* change angle of text. 0 is horizontal left to right.
- ***************
- *** 919,924 ****
- --- 923,936 ----
- X11_linetype, X11_put_text, null_text_angle,
- X11_justify_text, do_point, do_arrow}
- #endif
- +
- + #ifdef ATARIST
- + ,{ST_TERM_NAME, "Atari ST monochrome high-res screen",
- + 0, 0, 0, 0, ST_VTIC, ST_HTIC,
- + ST_init, ST_reset, ST_text, null_scale, ST_graphics,
- + ST_move,ST_vector,ST_linetype, ST_put_text, ST_text_angle,
- + ST_justify_text, line_and_point, do_arrow}
- + #endif /* ATARIST */
- };
-
- #define TERMCOUNT (sizeof(term_tbl)/sizeof(struct termentry))
- ***************
- *** 1032,1043 ****
- term_name = vms_init();
- #endif
-
- ! #ifdef SUN
- term = getenv("TERM"); /* try $TERM */
- if (term_name == (char *)NULL
- && term != (char *)NULL && strcmp(term, "sun") == 0)
- term_name = "sun";
- ! #endif /* sun */
-
- #ifdef UNIXPC
- if (iswind() == 0) {
- --- 1044,1058 ----
- term_name = vms_init();
- #endif
-
- ! #if defined(SUN) || defined(atarist)
- term = getenv("TERM"); /* try $TERM */
- if (term_name == (char *)NULL
- && term != (char *)NULL && strcmp(term, "sun") == 0)
- term_name = "sun";
- ! if (term_name == (char *)NULL
- ! && term != (char *)NULL && strcmp(term, "atari") == 0)
- ! term_name = "atari";
- ! #endif /* sun || atarist */
-
- #ifdef UNIXPC
- if (iswind() == 0) {
- diff -c -r orig-gnuplot/term.h gnuplot/term.h
- *** orig-gnuplot/term.h Tue Sep 18 05:59:21 1990
- --- gnuplot/term.h Sun Jun 2 05:30:22 1991
- ***************
- *** 35,41 ****
- */
-
- /* These terminals are not relevant for MSDOS */
- ! #ifndef MSDOS
-
- #define AED /* AED 512 and AED 767 */
- #define BITGRAPH /* BBN BitGraph */
- --- 35,41 ----
- */
-
- /* These terminals are not relevant for MSDOS */
- ! #if !defined(MSDOS) && !defined(atarist)
-
- #define AED /* AED 512 and AED 767 */
- #define BITGRAPH /* BBN BitGraph */
- ***************
- *** 83,86 ****
- --- 83,90 ----
- #define CORONA /* Corona graphics 325 */
- #define HERCULES /* IBM PC/Clone with Hercules graphics board */
- #endif
- + #endif
- +
- + #ifdef atarist
- + #define ATARIST
- #endif
- Only in gnuplot/term: atari.trm
-